<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录-江宁义务网上商城 - 网购首选 - 正品低价、品质保障、货到付款、配送及时、放心服务、轻松购物！</title>
<meta name="description" content="义务商城-专业的综合网上购物商城，在线销售家电、数码通讯、电脑、家居百货、服装服饰、母婴、图书、食品、在线旅游等数万个品牌千万种优质商品。便捷、诚信的服务，为您提供愉悦的网上商城购物体验! ">
<meta name="Keywords" content="网上购物,网上商城,手机,笔记本,电脑,MP3,CD,VCD,DV,相机,数码,配件,手表,存储卡,京东商城">
<jsp:include page="../common/include.jsp"></jsp:include>
<!-- mobile setting -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<script src="<c:url value="/scripts/jquery-1.7.2.min.js"/>"></script>
<script>
    function mession(obj){
    	//$(obj).addClass("inputTxtClass-focus");
    	$(obj).parent().parent().find("div.first").css("display","block");
    	$(obj).parent().parent().find("div.second").css("display","none");
    	$(obj).parent().parent().find("div.thread").css("display","none");
    }
    
    function validVal(obj){
    	//$(obj).removeClass("inputTxtClass-focus");
    	$(obj).parent().parent().find("div.first").css("display","none");
    	var val = jQuery.trim($(obj).val());
    	if($(obj).attr("name")=="username"){
        	var regu = "^[0-9a-zA-Z\\_]{2,20}$";
        	var regu1 = "^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$";
        	var regu2 = "^[0-9]{11}$";
        	var re = new RegExp(regu);
        	var re1 = new RegExp(regu1);
        	var re2 = new RegExp(regu2);
        	if(val == ""){
        		//$(obj).addClass("inputTxtClass-error");
        		$(obj).parent().parent().find("div[class='second'] span").text("请输入用户名");
                $(obj).parent().parent().find("div[class='second']").css("display","block");
                return false;
        	}
        	if(re.test(val) || re1.test(val) || re2.test(val)){
        		return true;
        	}else{
        		//$(obj).addClass("inputTxtClass-error");
        		$(obj).parent().parent().find("div[class='second'] span").text("用户名格式错误");
                $(obj).parent().parent().find("div[class='second']").css("display","block");
                return false;
        	}
    	}else{
                var regu = "^[0-9a-zA-Z]{6,16}$";
                var re = new RegExp(regu);
                if(val == ""){
            		$(obj).parent().parent().find("div[class='second'] span").text("请输入密码");
                    $(obj).parent().parent().find("div[class='second']").css("display","block");
                    return false;
                }
                if(re.test(val)){
                	return true;
                }else{
            		$(obj).parent().parent().find("div[class='second'] span").text("密码格式错误");
                    $(obj).parent().parent().find("div[class='second']").css("display","block");
                    return false;
                }
    	}
    }
    
    function login(){
    	var obj1 = $("input[name='username']")[0];
    	var obj2 = $("input[name='pwd']")[0];
    	var bool1 = validVal(obj1);
    	var bool2 = validVal(obj2);
    	if(bool1 && bool2){
    		return true;
    	}else{
    		return false;
    	}
    }
</script>
<style type="text/css">
.first{display:none;float:left;margin-top:5px;margin-left:20px;
    border-bottom:#ececd5 1px solid;border-left:#ececd5 1px solid;width:230px;
    background:#fffceb;line-height:14px;height:20px;color:#686868;border-right:#ececd5 1px solid;
    border-radius:2px;padding-left:8px;padding-right:8px;padding-top:4px;padding-bottom:4px;font-size:12px;
}
.second{display:none;border:#e5c3c4 1px solid;
    padding:0 5px 0 5px;line-height:30px;background:#ffeaea;white-space:nowrap;
    height:30px; border-radius:3px;font-size:12px;
}
.red{color:#c00;}
.thread{display:none;float:left;width:30px;margin-top:5px;margin-left:20px;height:32px;
    background:url(../images/topbarnav_bg.png) no-repeat 0px -10px;
}
</style>
</head>
<body>
<div class="wrapper">
    <div class="header_container">
        <!--Header Starts-->
        <header><div class="header">
            <div class="top_bar clear">
                <!--Language Switcher Starts-->
	              <div class="language_switch"> Hi. 蜗牛2. [<a href="<c:url value="/wlc"/> ">首页</a>]</div>
					<div class="language_switch head-right"> 您好,&nbsp;
						<c:if test="${user != null }">${uname} &nbsp;&nbsp;[<a href="<c:url value="/urc/lgnout"/>">退出</a>]</c:if>
						<c:if test="${user == null }"> 欢迎蜗牛商城 ! &nbsp;[<a href="<c:url value="/urc/lgnpage"/>">登录</a>]&nbsp; [<a href="<c:url value="/urc/regpage"/>">免费注册</a>]
						</c:if>
					 &nbsp;|&nbsp; <a class="nav" href="<c:url value="/ordc/myorder"/>">我的订单</a>&nbsp;|&nbsp; <a class="nav" href="#">客户服务</a></div>
                <!--Top Links Ends-->
            </div>
            <!--Logo Starts-->
            <h1 class="logo"> <a href="<c:url value="/wlc"/>"><img src="<c:url value="/images/logo.png"/> " /></a></h1>
            <!--Logo Ends-->
            <!--Search Starts-->
            	<div class="header_login"> | 亲, 欢迎登录</div>
            <!--Search Ends-->
        </div></header>
        <!--Header Ends-->
    </div>
    <div class="navigation_container">
        <!--Navigation Starts-->
        <!--Navigation Ends-->
    </div>
    <div class="section_container">
        <!--Mid Section Starts-->
        <section><div class="section">
        	<div class="login_box_">
        	<div class="login_box">
        		  <img src="<c:url value="/images/login_logo.jpg"/>">
        		  <form action="<c:url value="/urc/lgn"/> " method="post">
        		  <input type="hidden" name="backurl" value="backurl">
				  <div class="login_ll">
					<table>
						<tr>
							<td><br>邮箱 / 用户名 / 手机号：</td>
							<td></td>
						</tr>
						<tr>
							<td><input type="text" class="inputTxtClass" value="" name="username" onfocus="mession(this)" onblur="validVal(this)"></td>
							<td>
					  	        <div class="second"><span class="red"></span></div>
							    <div class="thread"></div></td>
						</tr>
						<tr>
							<td class="btn_subm_td">登录密码：</td>
							<td></td>
						</tr>
						<tr>
							<td><input type="password"  class="inputTxtClass" value="" name="pwd" onfocus="mession(this)" onblur="validVal(this)"></td>
							<td>
					  	        <div class="second"><span class="red"></span></div>
							    <div class="thread"></div></td>
						</tr>
						<tr>
							<td  class="btn_subm_td">验证码：</td>
							<td></td>
						</tr>
						<tr>
							<td><input type="text" name="code" class="code"></td>
							<td></td>
						</tr>
						<tr>
							<td class="btn_subm_td"><input type="submit" onclick="return login();" value="登  录"></td>
							<td></td>
						</tr>
						<tr>
							<td><br>&nbsp;</td>
							<td class="fg_pwd_td"><br><a href="#">忘记密码？</a></td>
						</tr>
					</table>
				  </div></form>
        	</div></div>
        	<p>&nbsp;</p>
        </div></section>
        <!--Mid Section Ends-->
    </div>
    <div class="footer_container">
        <!--Footer Starts-->
            <address>
            	<ul><li><a href="#">关于我们</a></li>
            		<li><a href="#">联系我们</a></li>
            		<li><a href="#">人才招聘</a></li>
            		<li><a href="#">商家入驻</a></li>
            		<li><a href="#">广告服务</a></li>
            		<li>免责条款 © 2012-2014 ***  版权所有，并保留所有权利。 </li>
   				</ul>
            </address>
        <!--Footer Ends-->
    </div>
</div>

<!--CUSTOMIZE-->
<!-- <style type="text/css">
.page_selector{ position:absolute; right:0px; top:28%;}
.page_selector a.page_open{ display:inline-block; width:60px; height:12px; background:#252525; color:#fff; text-align:center; font-size:14px; padding:20px 0px; font-weight:bold; text-decoration:none; float:left;}
.page_selector ul{ float:left; background:#f0f0f0; padding:10px 0px; border-top:solid 2px #000; border-bottom:solid 2px #000; display:none;}
.page_selector ul li{ padding:8px 10px; }
.page_selector ul li a{ font-weight:bold; text-decoration:none; color:#000; display:block; padding:2px 5px; text-transform:uppercase; font-size:11px;}

.store_selector{ position:absolute; left:0px; top:28%;}
.store_selector .store_open{display:inline-block; width:128px; height:55px;}
.store_selector div{ float:left; width:157px; height:226px; display:none;}
</style> -->
<!--CUSTOMIZE-->
</body>
</html>